/**
 * 
 */
package trigger;

/**
 * @author Philip
 *
 */
public class MeResponseFlag extends PrivmsgResponseFlag {

	public MeResponseFlag(Trigger flaggedTrigger) {
		super(flaggedTrigger);
	}
	
	public String response() {
		StringBuilder newResponse = new StringBuilder();
		
		for (int i = 0; i < flaggedTrigger.linesInResponse() - 1; i++) {
			newResponse.append(command() + " " + receiver + " :\001ACTION " + flaggedTrigger.response(i) + "\001\n");
		}
		
		newResponse.append(command() + " " + receiver + " :\001ACTION " + flaggedTrigger.response(linesInResponse() - 1) + "\001");
		
		return newResponse.toString();
	}
}
